package kr.ac.skhu.m.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import kr.ac.skhu.m.domain.Comment;
import kr.ac.skhu.m.domain.Used;

import org.springframework.jdbc.core.RowMapper;

public class CommentM implements RowMapper {

	@Override
	public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
		
		Comment comment = new Comment();
		
		comment.setArticleNo(rs.getString("article_no"));
		comment.setComment(rs.getString("comment"));
		comment.setRegDate(rs.getTimestamp("reg_date"));
		comment.setWriter(rs.getString("writer"));
		comment.setPassword(rs.getString("password"));
		comment.setCommentNo(rs.getString("comment_no"));
		
		return comment;
	}
	
}
